﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
/// Summary description for UrlConfig
/// </summary>
public class UrlConfig
{
	public UrlConfig()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    // Generate Category Url
    public static string Prepare_Category_Url(int categoryid, string categoryname, string term, int type, bool maincategory)
    {
        string URL = "";
        string PATH = "";
      
            switch (type)
            {
                case 0:
                    PATH = "videos/category/";
                    break;
                case 1:
                    PATH = "groups/category/";
                    break;
                case 2:
                    PATH = "channel/type/";
                    break;
                case 5:
                    PATH = "photos/category/";
                    break;
                case 6:
                    PATH = "blogs/category/";
                    break;
                case 7:
                    PATH = "audio/category/";
                    break;
                case 8:
                    PATH = "galleries/category/";
                    break;
                case 12:
                    PATH = "forums/category/";
                    break;
            }
      

        string _term = categoryname;
        if (term != "")
            _term = term;

        URL = Config.GetUrl() + "" + PATH + "" + UtilityBLL.ReplaceSpaceWithHyphin_v2(_term.Trim().ToLower()) + ".aspx";

        return URL;
    }

}